package com.claude.mainactivity;

import java.util.ArrayList;

import com.claude.bean.Cron;
import com.claude.bean.Session;
import com.claude.bean.Student;
import com.claude.bean.Subject;
import com.claude.bean.User;
import com.claude.bean.Version;
import com.claude.communication.RequestManager;
import com.claude.ui.CheckCompanet.MessageItem;

import android.app.Application;

public class MyApplication extends Application {
	//false is off line
	private boolean offlineState = false;
	private User mUser = null;
	private Version mVersion = null;
	private ArrayList<Subject> mSubjects = null;
	private ArrayList<Session> mSessions = null;
	private Cron mCron = null;
	private ArrayList<Student> mStudents = null;
	
	private Subject curSubject = null;
	private Session curSession = null;
	
	private ArrayList<MessageItem> checkState = null;
	

	public void onCreate() {
		super.onCreate();
		RequestManager.newInstance().init(this);
	}
	
	public void setStudents(ArrayList<Student> students){
		mStudents = students;
	}
	
	public ArrayList<Student> getStudents(){
		return mStudents;
	}
	
	public void setCron(Cron cron){
		mCron = cron;
	}
	
	public Cron getCron(){
		return mCron;
	}
	
	public void setCheckState(ArrayList<MessageItem> checkState){
		this.checkState = checkState;
	}
	
	public ArrayList<MessageItem> getCheckState(){
		return this.checkState;
	}
	
	public void setCurSession(Session curSession){
		this.curSession = curSession;
	}
	
	public Session getCurSession(){
		return this.curSession;
	}
	
	public void setCurSubject(Subject subject){
		this.curSubject = subject;
	}
	
	public Subject getCurSubject(){
		return this.curSubject;
	}

	public void setUser(User user) {
		this.mUser = user;
	}

	public User getUser() {
		return this.mUser;
	}

	public void setVersion(Version version) {
		this.mVersion = version;
	}

	public Version getVersion() {
		return this.mVersion;
	}
	
	public void setSubjects(ArrayList<Subject> subjects){
		this.mSubjects = subjects;
	}
	
	public ArrayList<Subject> getSubjects(){
		return this.mSubjects;
	}
	
	public void setSessions(ArrayList<Session> sessions){
		this.mSessions = sessions;
	}
	
	public ArrayList<Session> getSessions(){
		return this.mSessions;
	}
	
	public void setOfflineState(boolean state){
		this.offlineState = state;
	}
	
	public boolean getOfflineState(){
		return this.offlineState;
	}
}
